Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds exists/aliasExists() methods to SDKIndicesClient #802

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

joshpalis
Copy link
Member

@joshpalis joshpalis commented Jun 2, 2023

Description

In an effort to replace cluster state calls with more targeted requests, the following methods used to determine if an index exists within a cluster will be replaced by the SDKIndicesClient exists() and aliasExists() methods :

  • state().getRoutingTable().hasIndex(indexName)
  • state().metadata().hasIndex(indexName)
  • state().metadata().indices().containsKey(indexName)
  • state().metadata().hasAlias(alias)

Issues Resolved

Part of #674

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should really help create detector!

@joshpalis joshpalis merged commit 247c2cd into opensearch-project:main Jun 2, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 2, 2023
Signed-off-by: Joshua Palis <[email protected]>
(cherry picked from commit 247c2cd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@joshpalis joshpalis deleted the state branch June 2, 2023 21:44
joshpalis pushed a commit that referenced this pull request Jun 2, 2023
(cherry picked from commit 247c2cd)

Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants